-- @owner: lihongji
-- @date: 2022/07/14
-- @testpoint: 函数 next_day ，connectby测试

--step1:建表;expect:成功
drop table if exists t_ustore_nextday_0055;
create table t_ustore_nextday_0055(
empid int ,
name varchar(30) ,
intime date ,
outtime date ,
constraint conn_empid primary key(empid)
) with (storage_type=ustore);

--step2:建序列;expect:成功
drop sequence if exists sq_ustore_nextday_0055;
create sequence sq_ustore_nextday_0055 start with 1 increment by 1;
truncate table t_ustore_nextday_0055;

--step3:插入数据;expect:成功
insert into t_ustore_nextday_0055 values(
sq_ustore_nextday_0055.nextval,
'zhangjianxun',
'2019-01-03 15:19:00',
'2018-01-03 15:19:00');
insert into t_ustore_nextday_0055 values(
sq_ustore_nextday_0055.nextval,
'wangwei',
'2019-01-10 15:19:00',
'2019-01-01 15:19:00');
insert into t_ustore_nextday_0055 values(
sq_ustore_nextday_0055.nextval,
'wanghuanzhuo',
'2019-01-17 15:19:00',
'2019-01-02 15:19:00');
insert into t_ustore_nextday_0055 values(
sq_ustore_nextday_0055.nextval,
'jiangxiangbo',
'2019-01-24 15:19:00',
'2019-01-7 15:19:00');
insert into t_ustore_nextday_0055 values(
sq_ustore_nextday_0055.nextval,
'yuzhenglin',
'2019-01-31 15:19:00',
'2019-01-8 15:19:00');
insert into t_ustore_nextday_0055 values(
sq_ustore_nextday_0055.nextval,
'peibaoyi',
'2019-02-07 15:19:00',
'2019-01-9 15:19:00');
insert into t_ustore_nextday_0055 values(
sq_ustore_nextday_0055.nextval,
'chenyao',
'2019-01-19 15:19:00',
'2019-01-22 15:19:00');
insert into t_ustore_nextday_0055 values(
sq_ustore_nextday_0055.nextval,
'yuanhuilei',
'2019-01-20 15:19:00',
'2019-01-23 15:19:00');
insert into t_ustore_nextday_0055 values(
sq_ustore_nextday_0055.nextval,
'yangyudong',
'2019-01-26 15:19:00',
'2019-01-29 15:19:00');
insert into t_ustore_nextday_0055 values(
sq_ustore_nextday_0055.nextval,
'yinyong',
'2019-01-30 15:19:00',
'2019-01-31 15:19:00');
insert into t_ustore_nextday_0055 values(
sq_ustore_nextday_0055.nextval,
'baojingjing',
'2019-02-02 15:19:00',
'2019-02-05 15:19:00');
insert into t_ustore_nextday_0055 values(
sq_ustore_nextday_0055.nextval,
'maxiaodi',
'2019-02-03 15:19:00',
'2019-02-06 15:19:00');
insert into t_ustore_nextday_0055 values(
sq_ustore_nextday_0055.nextval,
'lihongna',
'2019-01-15 15:19:00',
'2019-02-08 15:19:00');

--step4:查询;expect:成功
select intime from t_ustore_nextday_0055 order by empid;

--step5:清理环境;expect:成功
drop table if exists t_ustore_nextday_0055;
drop sequence if exists sq_ustore_nextday_0055;